Storage devices such as solid-state drives (SSDs) and hard disk drives (HDDs) create metadata to manage physical storage media on which data are stored. When erase domains are larger than write blocks, the write blocks may be re-mapped to free blocks to enable coalescing of valid blocks and harvest a space for writing new data. Such harvesting is referred to as “garbage collection.” The performance of storage devices that employ such metadata structure can be heavily dependent on the availability of empty spaces on the storage media at a given time.
When erase domains of storage media become fragmented with a mix of valid and invalid data, valid data blocks in the erase domains are copied and coalesced into erase domains containing only valid data. In some cases, all blocks in some erase domains are invalidated to create a “free” erase domain for new data. While it is a time-consuming operation, it is a normal and necessary operation required for such storage devices.
A new and empty storage device does not require garbage collection to make its storage media available when a write command is received. In this case, a valid data entry is merely added to its metadata to index and point to the location of the data that is written. The performance of a storage device in a “fully-written” state may be much more representative of its true capabilities than when the storage device is in an “empty” state.
In addition, the performance of a storage device may vary at its fully-written state with the patterns of writes performed. For example, a storage device with a predominant patterns of random writes may exhibit a different performance from a storage device with predominant patterns of sequential writes. Similarly, a storage device with a predominant patterns of frequently over-written blocks may exhibit a different performance from a storage device with predominant patterns of infrequently over-written blocks. As a result, the state of the storage device may be characterized based on the number and patterns of writes being applied.
When developing software for storage devices, it is necessary to periodically check the performance of the storage device in a representative state, for example, a non-empty or nearly fully-written state. Before benchmarking the performance of a storage device, the storage device is typically pre-conditioned with a series of writes to place the storage device into a representative state. When deploying storage devices into a working environment, it is important to ensure predictable performance of the storage devices when they operate in their representative states. Therefore, it is desirable to pre-condition storage drives to their representative state before deployment.
As device capacities of storage devices increase, the pre-conditioning process takes ever-increasing amounts of time, typically many hours or even days. Therefore, it is of great value to developers and to anyone who desires to benchmark performance of their systems to shorten the pre-conditioning process of the storage devices.
The pre-conditioning processes for storage devices can significantly reduce their lifetime. Pre-conditioning typically entails writing of nearly all of the device's media at least once, and in the case of SSDs, it requires a great deal of erasing. Therefore, it is highly desirable to reduce the amount of writing and erasing of storage media required by a device pre-conditioning process.